package cn.ainit.sys.query.mainList;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.ainit.sys.query.datastore.DataStore;
import cn.ainit.sys.query.entity.QueryButton;
import cn.ainit.sys.query.entity.QueryColumn;
import cn.ainit.sys.ui.buttons.FormButtons;
import cn.ainit.sys.ui.forms.Columns;

@Service("mainListServiceImpl")
public class MainListServiceImpl implements MainListService{
	
	MainListDao mainListDao;

	
	@Resource
	public void setMainListDao(MainListDao mainListDao) {
		this.mainListDao = mainListDao;
	}

	@Override
	public List<QueryButton> QueryButtons(String partOrAll, String id)
			throws Exception {
		
		return mainListDao.QueryButtons(partOrAll, id);
	}

	@Override
	public List<QueryColumn> QueryShowColumns(String flag, String id)
			throws Exception {
		return mainListDao.QueryShowColumns(flag, id);
	}

	@Override
	public List<FormButtons> QueryUIButtons(String partOrAll, String id)
			throws Exception {
		return mainListDao.QueryUIButtons(partOrAll, id);
	}

	@Override
	public List<Columns> QueryUIColumns(String partOrAll, String formId)
			throws Exception {
		return mainListDao.QueryUIColumns(partOrAll, formId);
	}

	@Override
	public List getRows(String sql, int pageNumber, int pageSize)
			throws Exception {
		return mainListDao.getRows(sql, pageNumber, pageSize);
	}

	@Override
	public DataStore querySql(String id) throws Exception {
		return mainListDao.querySql(id);
	}
	
 
}
